class BangumiTypesController < ApplicationController
  skip_before_filter :verify_authenticity_token
  #before_filter :correct_bili_name?, :limit_bili_users
  #layout "need_bili_name"

  def new
    @bangumi_type = BangumiType.new
    render :action => :edit
  end

  def edit
    @bangumi_type = BangumiType.find params[:id]
  end

  def index
    @bangumi_types = BangumiType.all  :order => '"index"'
  end

  def create
    BangumiType.create! params[:bangumi_type]
    redirect_to :action => :index
  end

  def update
    bangumi_type = BangumiType.find params[:id]
    bangumi_type.update_attributes params[:bangumi_type]
    redirect_to :action => :index
  end
end
